package com.bc.commonentity.log;

import com.bc.commonentity.enums.LogDetailType;
import org.aspectj.lang.ProceedingJoinPoint;

/**
 * Created by Administrator on 2018/4/19.
 */
public class AroundAspect {
    /**
     * postget层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object postgetAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.aspectDetail(point, LogDetailType.postget);
    }
    /**
     * redis层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object redisAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.aspectDetail(point, LogDetailType.redis);
    }
    /**
     * dao层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object daoAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.daoAspectDetail(point,null);
    }
    /**
     * mongo层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object mongoAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.aspectDetail(point, LogDetailType.mongo);
    }
    /**
     * rabbitmq层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object rabbitMqAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.aspectDetail(point, LogDetailType.rabbitMq);
    }

    /**
     * activemq层aop拦截
     * @param point
     * @return
     * @throws Throwable
     */
    public Object activeMqAround(ProceedingJoinPoint point) throws Throwable {
        return AspectLogHelper.aspectDetail(point, LogDetailType.activeMq);
    }
}
